package com.cloud.adrian.novel.user.dto.resp;

import com.cloud.adrian.novel.common.json.serializer.UsernameSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @Author: xiangguiliang
 * @version: 1.0
 * @since: 2024/05/27
 */
@Data
@Builder
public class UserCommentRespDto {
    @Schema(description = "评论ID")
    private Long id;

    @Schema(description = "评论内容")
    private String commentContent;

    @Schema(description = "评论用户")
    @JsonSerialize(using = UsernameSerializer.class)
    private String commentUser;

    @Schema(description = "评论用户id")
    private Long commentUserId;

    @Schema(description = "评论用户头像")
    private String commentUserPhoto;

    @Schema(description = "评论时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime commentTime;
}
